import { NextRequest, NextResponse } from 'next/server';

export async function GET ( req: NextRequest ){

    const rhello = new URL('/api/hello', req.url);
    console.log("rhello:"+req.url);
    rhello.searchParams.set('from', req.nextUrl.pathname);
    rhello.searchParams.set('id',req.nextUrl.searchParams.get('id'));
    return NextResponse.redirect(rhello);
}
